package com.ice.app.system.mapper;

import java.util.List;
import java.util.Map;

import com.ice.app.system.entity.Role;
import com.ice.app.system.role.vo.RoleMenuRelVo;
import com.ice.app.system.role.vo.RoleTreeVo;
import com.ice.app.system.role.vo.RoleUserRelVo;

/**
 * 角色
 * 
 * @author Mr.Palo
 * @email 442803840@qq.com
 * 
 */
public interface RoleMapper{

	int insertSelective(Role role);
	
	int deleteByPrimaryKey(String key);
	
	int updateByPrimaryKeySelective(Role role);
	
	Role selectByPrimaryKey(String key);
	
	List<String> selectByUsername(String username);

	List<Role> selectByFilter(Map<String,Object> map);

	int deleteRoleMenuRelByRoleId(String roleId);

    int insertRoleMenuRelByRoleId(RoleMenuRelVo record);
    
    int deleteRoleUserRelByUserId(String userId);
    
    int insertRoleUserRelByUserId(RoleUserRelVo record);

	List<RoleTreeVo> selectRoleTreeByUserId(String userId);

}
